package com.project.dubbo.springboot.provider.api;

import javax.annotation.Resource;

import org.springframework.stereotype.Component;

import com.alibaba.dubbo.config.annotation.Service;
import com.project.dubbo.springboot.api.UserServiceClient;
import com.project.dubbo.springboot.api.bo.User;
import com.project.dubbo.springboot.provider.service.UserService;

@Service(
	version = "1.0.0",
	application = "${dubbo.application.id}",
	protocol = "${dubbo.protocol.id}",
	registry = "${dubbo.registry.id}"
)
@Component
public class UserDubboService implements UserServiceClient {

	@Resource
	private UserService userService;
	
	@Override
	public boolean createUser(User user) {
		return userService.createUser(user);
	}

	@Override
	public User findById(Integer id) {
		return userService.findById(id);
	}

}
